/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.csvgenerator.settings;

/**
 *
 * @author Administrator
 */
public class GlobalConstants {

    public enum BlankSpace {

        BEFORE,
        AFTER,
        BOTH,
        NONE
    }

    public static BlankSpace blankSpaceType(String blankSpaceType) {
        if (blankSpaceType.trim().equalsIgnoreCase("BEFORE")) {
            return BlankSpace.BEFORE;
        } else if (blankSpaceType.trim().equalsIgnoreCase("AFTER")) {
            return BlankSpace.AFTER;
        } else if (blankSpaceType.trim().equalsIgnoreCase("BOTH")) {
            return BlankSpace.BOTH;
        } else if (blankSpaceType.trim().equalsIgnoreCase("NONE")) {
            return BlankSpace.NONE;
        }
        System.out.println("Unknown spacing type. Fatal Error");
        System.exit(1);
        return null;
    }

    public enum NewLine {

        BEFORE,
        AFTER,
        BOTH,
        NONE
    }

    public static NewLine newLineType(String newLineType) {
        if (newLineType.trim().equalsIgnoreCase("BEFORE")) {
            return NewLine.BEFORE;
        } else if (newLineType.trim().equalsIgnoreCase("AFTER")) {
            return NewLine.AFTER;
        } else if (newLineType.trim().equalsIgnoreCase("BOTH")) {
            return NewLine.BOTH;
        } else if (newLineType.trim().equalsIgnoreCase("NONE")) {
            return NewLine.NONE;
        }
        System.out.println("Unknown new line type. Fatal Error");
        System.exit(1);
        return null;
    }
}
